public class num392 {
    public boolean isSubsequence(String s, String t) {
        int i = 0,j = 0;
        while (j < t.length() && i < s.length()) {
            if(s.substring(i,i + 1).equals(t.substring(j,j + 1))) {
                i ++;
            }
            j ++;
        }
        return  i == s.length();
    }
}
